import multiprocessing
import time


def func(i):
    print('子进程开始', i, multiprocessing.current_process().ident)


def main():
    print('主进程开始', multiprocessing.current_process().ident)
    for i in range(10):
        p1 = multiprocessing.Process(target=func, args=(i,))
        p1.start()


if __name__ == '__main__':
    main()
